package com.zlp.service.impl;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zlp.dao.SysUserMapper;
import com.zlp.entity.SysUser;
import com.zlp.service.SysUserService;

@Service
public class SysUserServiceImpl implements SysUserService{

	@Autowired
	private SysUserMapper sysUserMapper;
	
	@Override
	public SysUser selectByPrimaryKey(String id) {
		return sysUserMapper.selectByPrimaryKey(id);
	}
    
	@Override
	public PageInfo<Map<String, Object>> queryUserList(HttpServletRequest request,
			Map<String, String> paramMap) {
		PageHelper.startPage(1,10);// 开始分页
		List<Map<String, Object>> userList = sysUserMapper.getUserList();
		PageInfo<Map<String,Object>> pageInfo = new PageInfo<Map<String,Object>>(userList);
		return pageInfo;
	}

}
